//
//  StoreMainModel.m
//  ArtDog
//
//  Created by dllo on 16/9/7.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "StoreMainModel.h"
#import "HomeExhibitWorkList.h"
#import "StoreDerivativeList.h"
#import "StoreGoodsCategoriesList.h"
#import "StoreBanners.h"

@implementation StoreMainModel

- (void)setValue:(id)value forKey:(NSString *)key
{
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"artList"]) {
        NSMutableArray<HomeExhibitWorkList *> *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            HomeExhibitWorkList *artModel = [HomeExhibitWorkList modelWithDic:dic];
            [array addObject:artModel];
        }
        _artList = array;
    } else if ([key isEqualToString:@"derivativeList"]) {
        NSMutableArray<StoreDerivativeList *> *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            StoreDerivativeList *derivativeModel = [StoreDerivativeList modelWithDic:dic];
            [array addObject:derivativeModel];
        }
        _derivativeList = array;
        
    } else if ([key isEqualToString:@"customizeList"]) {
        NSMutableArray<StoreDerivativeList *> *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            StoreDerivativeList *customizeModel = [StoreDerivativeList modelWithDic:dic];
            [array addObject:customizeModel];
        }
        _customizeList = array;
        
    } else if ([key isEqualToString:@"GoodsCategoriesList"]) {
        NSMutableArray<StoreGoodsCategoriesList *> *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            StoreGoodsCategoriesList *goodsCategoriesModel = [StoreGoodsCategoriesList modelWithDic:dic];
            [array addObject:goodsCategoriesModel];
        }
        _goodsCategoriesList = array;
        
    } else if ([key isEqualToString:@"banner"]) {
        NSMutableArray<StoreBanners *> *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            StoreBanners *topicModel = [StoreBanners modelWithDic:dic];
            [array addObject:topicModel];
        }
        _banner = array;
        
    }
    
}


@end
